package agendaSystem;

public class MainProgram {

	public static void main(String[] args) {

			System.out.println("PART3");
			System.out.println("------------------------------------------------------------");
			Agenda alice = new Agenda("Alice");
			Agenda bob   = new Agenda("Bob");
			Agenda carol = new Agenda("Carol");
			Agenda[] meeters  = { alice };
			Agenda[] meeters2 = { alice, bob };
			Agenda[] meeters3 = { alice, bob, carol };
			
			Event birthDay = new Event("Mom's 65th birthday", 80, alice); 
		
			Meeting meet = new Meeting(meeters2, "Meeting", 11, 12, 13);
	
			Meeting meet2 = new Meeting(meeters3, "Meeting2", 12, 10, 11);
			
			//This PersonalEntry overlaps with the Meeting meet, we can not initialize this entry.
			//PersonalEntry tennis = new PersonalEntry(meeters,"Tennis Training", 11, 11, 12, 18);
			
			PersonalEntry dinner = new PersonalEntry(meeters,"Dinner With Mom", 80, 19, 20);
			
			System.out.println("The agenda of Bob contains the following entries: ");
			System.out.println("------------------------------------------------------------");
			for (Entry en : bob.getAllEntries()) {
				System.out.println("The description of the entry is: " + en.getDescription());
				System.out.println("The day of the entry is: " + en.getDay());		
				System.out.println("The first slot of the entry is: " + en.getFirstSlot());
				System.out.println("The last slot of the entry is: " + en.getLastSlot());
				System.out.println("The total number of slots of the entry is: " + en.getNbSlots());
				System.out.print("The slots used by the entry are: "); 
				for (int i = 1; i <= en.getSlots().length; i++) {
					if (en.getSlots()[i - 1] == true)
						System.out.print(i + " ");
				}
				System.out.println("");
				System.out.println("");
			}
		
			System.out.println("The agenda of Alice contains the following entries: ");
			System.out.println("------------------------------------------------------------");
			for (Entry en : alice.getAllEntries()) {
				System.out.println("The description of the entry is: " + en.getDescription());
				System.out.println("The day of the entry is: " + en.getDay());
				System.out.println("The first slot of the entry is: " + en.getFirstSlot());
				System.out.println("The last slot of the entry is: " + en.getLastSlot());
				System.out.println("The total number of slots of the entry is: " + en.getNbSlots());
				System.out.print("The slots used by the entry are: "); 
				for (int i = 1; i <= en.getSlots().length; i++) {
					if (en.getSlots()[i - 1] == true)
						System.out.print(i + " ");
				}
				System.out.println("");
				System.out.println("");
			} 
		} 
	}
